<?php
namespace BoxAddon\Hooks;
class AddonDataHooks extends \HooksController
{


    //保存序列化数据
    function before_addon_data_add(&$param)
    {
        $_post = I();
        $content = array();
        foreach ($_post as $k => $one) {
            if (!$param[$k]) {
                $content[$k] = $one;
            }
        }
        $param['add_time'] = date("Y-m-d H:i:s");
        $param['content'] = serialize($content);
        //dump($param);exit();
    }

    //序列化数据
    function table_addon_data_get(&$param)
    {
        $param['param']['group_name'] = "table_" . $param['name'] . "_post";
    }

    //校园代理申请
    function table_addon_data_agent_apply_post_load(&$param)
    {
        $param['qq'] = "355994512";
        $param['status_text'] = "审核通过";


        //dump($param);

    }

    //申请重学
    function table_addon_data_relearn_apply_post_load(&$param)
    {
        $param['qq'] = "355994512";
        $param['status_text'] = "审核通过";
        $param['subject_name'] = "国家计算机二级---office高级（每周考前突击的第一次课程）";
        //dump($param);

    }


    //申请奖学金
    function table_addon_data_scholarship_post_load(&$param)
    {
        $param['qq'] = "355994512";
        $param['status_text'] = "审核通过";
        $param['subject_name'] = "国家计算机二级---office高级（每周考前突击的第一次课程）";
        //dump($param);

    }


}
